package com.firewolf.dubbo.mains;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.firewolf.s05.service.VersionService;

public class VersionConsumer {
	@SuppressWarnings("resource")
	public static void main(String[] args) throws Exception {

		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(
				new String[] { "consumer.xml" });
		VersionService v1 = (VersionService) ctx.getBean("version1");
		System.out.println(v1.showVersion());
		VersionService v2 = (VersionService) ctx.getBean("version2");
		System.out.println(v2.showVersion());
	}
}
